1. Field of the Invention
This invention generally relates to node-to-node communications performed in serial-bus networks using serial buses, which connect personal computers (or PCs) and electronic apparatuses together. Specifically, this invention relates to signal sending-and-receiving circuits applicable to long-distance ports of nodes of the serial-bus networks and Self ID processes for initialization of the serial-bus networks in the node-to-node communications. Herein, the serial-bus networks are designed based on an architecture using a specific kind of serial bus or equivalence of such serial bus, which is standardized by xe2x80x9cIEEE Std. 1394-1995xe2x80x9d (i.e., IEEE Standard for a High Performance Serial Bus, where xe2x80x9cIEEExe2x80x9d is an abbreviation for xe2x80x9cInstitute of Electrical and Electronics Engineersxe2x80x9d), for example.
This application is based on Patent Application No. Hei 10-172343 filed in Japan, the content of which is incorporated herein by reference.
2. Description of the Related Art
Engineers have proposed networks using serial buses in transmission of control signals and main signals between peripheral devices (e.g., hard disk units and scanners) and/or electronic devices. Herein, the electronic devices contain terminal devices facilitating serial buses, which will be called xe2x80x9cnodesxe2x80x9d.
For example, the paper of Japanese Patent Application, Publication No. Hei 8-293879 discloses the technology related to the electronic devices such as the personal computers and digital television receivers which are connected with P1394 serial buses, wherein operation mode control is performed to avoid hang-up at a bus reset mode.
The aforementioned nodes have various kinds of state machines, functions of which can be mainly classified into four types. Namely, there are provided three processes for initialization of networks (i.e., Bus Reset process, Tree ID process and Self ID process) as well as a process (i.e., Normal process) which performs xe2x80x9cnormalxe2x80x9d communications between nodes.
Each of the processes defines multiple states. For example, the Bus Reset process defines two states, i.e., xe2x80x9cR0xe2x80x9d (Reset Start) and xe2x80x9cR1xe2x80x9d (Reset Wait).
In addition, the Tree ID process defines four states, i.e., xe2x80x9cT0xe2x80x9d (Tree ID Start), xe2x80x9cT1xe2x80x9d (Child Handshake), xe2x80x9cT2xe2x80x9d (Parent Handshake) and xe2x80x9cT3xe2x80x9d (Root Contention).
Further, the Self ID process defines five states, i.e., xe2x80x9cS0xe2x80x9d (Self ID Start), xe2x80x9cS1xe2x80x9d (Self ID Grant), xe2x80x9cS2xe2x80x9d (Self ID Receive), xe2x80x9cS3xe2x80x9d (Send Speed Capabilities), xe2x80x9cS4xe2x80x9d (Self ID Transmit). Furthermore, the Normal process defines seven states, i.e., xe2x80x9cA0xe2x80x9d (Idle), xe2x80x9cA1xe2x80x9d (Request Test), xe2x80x9cA2xe2x80x9d (Request Delay), xe2x80x9cA3xe2x80x9d (Request), xe2x80x9cA4xe2x80x9d (Grant), xe2x80x9cA5xe2x80x9d (Receive) and xe2x80x9cA6xe2x80x9d (Transmit).
The state machine performs state transition in response to a signal (or signals) given from an adjoining node connected thereto. Next, a description will be given with respect to node-to-node communications, which cause transition of states of the state machine.
It is possible to construct a network by using a serial bus, which uses two pairs of STPs (i.e., Shielded Twisted Pairs) within a prescribed range of node-to-node distances up to 4.5 m, for example. FIG. 7 shows an example of node-to-node communication effected between two nodes, i.e., xe2x80x9cNode 1xe2x80x9d and xe2x80x9cNode 2xe2x80x9d, which are connected together by two pairs of xe2x80x9ctwisted wire pairsxe2x80x9d (referred to as xe2x80x9cTPAxe2x80x9d and xe2x80x9cTPBxe2x80x9d respectively). Specifically, FIG. 7 shows contents of signals communicated between the nodes over a cable. Herein, TPA and TPB cross with each other. In FIG. 7, TPA at Node 1 corresponds to TPB at Node 2, while TPB at Node 1 corresponds to TPA at Node 2. In an initial state, both of Node 1 and Node 2 output Idle signals, where (TPA, TPB)=(Z,Z). Table 1 shows a result of collision effected between xe2x80x9cParent_notifyxe2x80x9d signal (0,Z) output from Node 1 and an output (Z,Z) of Node 2. That is, Table 1 indicates that as the result of the collision, Node 2 receives a state (Z,0) on the cable. Incidentally, xe2x80x9csend signalxe2x80x9d of Node 1 in Table 1 represents a signal which is observed from Node 2. Table 2 shows a result of collision effected between xe2x80x9cParent_notifyxe2x80x9d signal (0,Z) output from Node 1 and xe2x80x9cChild_notifyxe2x80x9d signal (Z,1) output from Node 2. That is, Table 2 indicates that as the result of the collision, Node 1 receives a state (0,1) on the cable. Incidentally, xe2x80x9csend signalxe2x80x9d of Node 2 in Table 2 represents a signal which is observed from Node 1. As described above, half duplex communication is performed between the nodes of the serial-bus network using the twisted wire pairs.
Next, a description will be given with respect to operations of nodes in accordance with a Self ID process with reference to a network architecture shown in FIG. 8. Herein, there provided four nodes, namely, Node 1, Node 2, Node 3 and Node 4, wherein both of Node 2 and Node 3 function as repeaters, each of which is configured using only a physical (link) layer (or PHY layer) consisting of a state machine and ports. Node 1 and Node 4 have other layers up to application layers in addition to the PHY layers. Incidentally, this invention exclusively relates to improvements in the PHY layers. Therefore, a description is omitted with regard to the other layers such as LINK layers, transaction layers and application layers. In the PHY layer, the DS port effects DS modulation (where xe2x80x9cDSxe2x80x9d is an abbreviation for xe2x80x9cData Strobexe2x80x9d) on signals given from the state machine, so that modulated signals are output on the twisted wire pairs TPA and TPB. In addition, the DS port demodulates signals given from the twisted wire pairs, so that demodulated signals are transferred to the state machine.
FIG. 9 shows an example of transition of states in the state machine in accordance with the conventional Self ID process. Herein, xe2x80x9cS0xe2x80x9d designates an initial state of the Self ID process. Upon receipt of a grant signal, the state machine performs a state transition from the state S0 to a state xe2x80x9cS1xe2x80x9d. Herein, the state S1 is a state that the state machine sends or receives the grant signal. Under a condition of xe2x80x9call_child_port_identified=truexe2x80x9d where the state machine receives signals declaring ends of the Self ID processes from all ports linked to child nodes, the state machine performs a state transition from the state S1 to a state S4. On the other hand, if the state machine receives a Data_prefix signal from a port linked to the child node, it performs a state transition from the state S1 to a state xe2x80x9cS2xe2x80x9d. Herein, the state S2 is a state that the state machine receives a Self ID packet. When the state machine ends reception of the packet and detects an Idle signal on a receive port, it performs state transition from the state S2 to the state S0. The state S4 is a state that the state machine sends the Self ID packet. So, when the state machine ends the Self ID process at completion in sending of the Self ID packet, it performs a state transition from the state S4 to a state A0 which corresponds to the Normal process. Incidentally, a description will be omitted with regard to a state S3 and its transition conditions, which are not directly related to the present invention.
Next, a description will be given with respect to operations of the Self ID process under an assumption that Node 1 serves as a root designating a central node of the network with reference to FIG. 10, which also shows transition of states of the state machine in Node 3. Each of Nodes 2, 3 and 4 receives a grant signal (grant 1) from the root (i.e., Node 1). Upon receipt of the grant signal, each of them sends a Self ID packet representing information thereof. At first, Node 1 sends xe2x80x9cgrant 1xe2x80x9d, so that Nodes 2 and 3 repeat (or relays) it. Upon receipt of grant 1, Node 3 performs a state transition from S0 to S1, so that it successively sends the grant signal (grant 1) to Node 4. Upon receipt of the grant 1, Node 4 sends a Self ID packet 1 to follow a Data_prefix signal representing a head portion of the packet. When receiving the Data_prefix signal from Node 4, Node 3 performs a state transition from S1 to S2, so that it stops repeating the grant 1. In addition, Node 3 sends an Idle signal to Node 4 while simultaneously repeating the Self ID packet 1, given from Node 4, with respect to Node 2. At the timing to complete reception of the Self ID packet 1 from Node 4, the state machine of Node 3 performs a state transition from S2 to S0. Similarly, Node 2 receiving a Data_prefix signal from Node 3 stops sending the grant 1. In addition, Node 2 sends an Idle signal to Node 3 while simultaneously repeating the Self ID packet 1 with respect to Node 1. Then, at completion in reception of the Self ID packet 1 from Node 2, Node 1 sends a next grant signal (grant 2) to Node 2 and Node 3. Upon receipt of the grant 2, Node 3 performs a state transition from S0 to S1. At this time, Node 4 which serves as a child node for Node 3 completes a Self ID process thereof So, Node 3 performs a state transition from S1 to S4. In addition, Node 3 sends a Self ID packet 2 following a Data_prefix signal to Node 2 and Node 4. Thereafter, procedures similar to the aforementioned procedures in the node-to-node communications will be repeated. Then, when all of the nodes complete sending of the Self ID packets thereof, the network ends the Self ID processes.
Meanwhile, it is possible to construct a network shown in FIG. 11 by changing the coding method and transmission paths, by which it is possible to actualize communications using a relatively long node-to-node distance which may exceed 4.5 m, for example. Herein, reference is made to xe2x80x9cP1394b Draft 0.10xe2x80x9d. In FIG. 11, each of Node 2 and Node 3 uses a long-distance port, details of which is shown in FIG. 12. Functions of the long-distance port are mainly classified into two sections, i.e., a sending section and a receiving section. Herein, the sending section of the long-distance port is configured by a sending encoder for performing transmission-path coding and scrambling on signals given from the state machine, a parallel-to-serial converter for converting parallel signals to serial signals, and a transmitter whose operation depends on a transmission medium (or transmission path) to be used. The receiving section of the long-distance port is configured by a receiver whose operation depends on the transmission medium, a serial-to-parallel converter for converting serial signals to parallel signals, a receiving decoder for performing decoding and de-scrambling on transmission-path codes, and a collision signal creation circuit for creating signals to activate a state machine of a high-order layer based on send signals given from the state machine and receive signals given from the transmission path. Such a configuration of FIG. 12 is taught by the paper of Japanese Patent Application No. Hei 9-269199, for example. As for the long-distance port, the transmission path for the sending section is provided independently of the transmission path for the receiving section. Therefore, it is possible to perform full duplex communications.
In some case, however, there is a possibility that the Self ID packets representing information of nodes are destructed or damaged in the network architecture whose node-to-node distance exceeds 4.5 m as shown in FIG. 11. In that case, there is a problem that initialization of the network is not completed normally.
Now, a description will be given with respect to damage of the Self ID packet with reference to FIG. 13. In FIG. 13, Node 1 corresponding to a root node sends a grant signal (grant 1). So, Nodes 2 and 3 repeat the grant 1. Thus, Node 3 performs a state transition from S0 to S1. In response to the grant 1, Node 4 sends a Self ID packet xe2x80x9c1xe2x80x9d to follow a Data_prefix signal representing a head portion of the packet. Node 3 receives the Data_prefix signal so as to cause a state transition from Si to S2. Thus, Node 3 stops repeating the grant 1 with respect to Node 4. In addition, Node 3 outputs an Idle signal (Idle 2) while simultaneously repeating the Self ID packet 1, given from Node 4, with respect to Node 2. At completion of reception of the Self ID packet 1 from Node 4, Node 3 performs a state transition from S2 to S0. When receiving the Data_prefix signal from Node 3, Node 2 stops repeating the grant 1. In addition, Node 2 outputs an Idle signal (Idle 3) to Node 3 while simultaneously repeating the Self Id packet 1, given from Node 3, with respect to Node 1. At completion of reception of the Self ID packet 1 from Node 2, Node 1 sends a next grant signal (grant 2) to Node 2. If a distance between Nodes 2 and 3 is relatively long, there is a possibility that the Idle 3 given from Node 2 does not reach Node 3 at completion of transmission of the Self ID packet 1 which is sent from Node 3 to Node 2. In such a case, the state machine of Node 3 mistakenly recognizes the grant 1 given from Node 2 as the grant signal which is issued for itself. Thus, Node 3 mistakenly performs a state transition from S0 to S1. Then, Node 3 performs a state transition from S1 to S4 because Node 4 ends the Self ID process thereof. As a result, Node 3 starts sending a Self ID packet 2. Thus, a collision occurs between the grant 2 and the Self ID packet 2 within communication effected between Nodes 1 and 2. So, the Self ID packet 2 should be damaged.
It is an object of the invention to provide a signal sending-and-receiving circuit that is capable of preventing Self ID packets (describing information of nodes) from being damaged in a serial-bus network whose node-to-node distance exceeds 4.5 m, for example.
It is another object of the invention to provide a Self ID process for the serial-bus network using the signal sending-and-receiving circuit, by which it is possible to complete initialization of the serial-bus network normally.
A signal sending-and-receiving circuit is applicable to a long-distance port (for a node-to-node distance of over 4.5 m) employed in a node having a state machine within a serial-bus network. Herein, the signal sending-and-receiving circuit is basically configured by a sending section and a receiving section. The sending section performs scrambling, coding and conversion on signals given from the state machine to produce serial signals, which are sent onto a transmission path. The receiving section performs conversion, de-scrambling and decoding on the serial signals given from the transmission path to produce decoded signals. In addition, a control signal is created based on a Data_prefix signal which is detected from the signals of the state machine, and an Idle signal or a Grant signal which is detected from the decoded signals. The control signal controls a selector to selectively output either the decoded signals or a pseudo Idle signal which is newly created. Then, a collision signal is created in response to an output of the selector. Thus, it is possible to avoid collision between a grant signal and a Self ID packet, so it is possible to prevent the Self ID packet from being damaged.
The state machine is designed to have fix states, namely, S0 (Self ID Start), S1 (Self ID Grant), S2 (Self ID Receive), S3 (Send Speed Capabilities), S4 (Self ID Transmit) and S5 (Self ID Suspend). Herein, the state machine is placed in the state S5 to suspend the Self ID process until the node detects Idle at a parent port connected to a parent node after detecting Idle at a receive port receiving the Self ID packet from another node.